<!DOCTYPE HTML>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#"

	xmlns:fb="https://www.facebook.com/2008/fbml">

<head>

<BASE href="<?= HOME; ?>" />

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="viewport"

	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

<meta name="keywords"

	content="<?php if($data[keyword]=="") { echo KEYWORD;}else{echo2($data[keyword]);} ?>" />

<meta name="description"

	content="<?php if($data[mota]=="") { echo DES;}else{echo2($data[mota]);} ?>" />

<title><?php if($data[title]=="") { 

	echo HEAD;

}else{echo2($data[title]);

} ?>

</title>

<link rel="icon" type="image/png" href="/favicon.png" />

<?php if($data['og']){ 

	echo $data['og'];

}?>

<link href="<?= HOME ?>public/bootstrap/css/bootstrap.css"	rel="stylesheet">

<link href="<?= HOME ?>public/font-awesome/css/font-awesome.css"	rel="stylesheet" type="text/css" />

<link href="<?= HOME ?>public/exts/css/theme.css" rel="stylesheet" />

<link href="<?= HOME ?>public/exts/css/general.css" rel="stylesheet"	type="text/css" />

<link rel="stylesheet" href="<?= HOME ?>public/exts/css/select2.css"	type="text/css" />

<link href="<?= HOME ?>public/exts/css/bootflat-extensions.css"	rel="stylesheet" />

<link href="<?= HOME ?>public/exts/slider2/jquery.nouislider.min.css"	rel="stylesheet" type="text/css" />

<?php if($_SESSION['mobile']!=0){?>

<link rel='stylesheet' href='public/exts/nav/css/icomoon.css'	type='text/css' media='all'>

<link rel='stylesheet'	href='public/exts/nav/css/jquery.mCustomScrollbar.css' type='text/css'	media='all'>

<link rel='stylesheet' href='public/exts/nav/css/orange.css'	type='text/css' media='screen'>

<?php }?>



<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->

<script type="text/javascript" language="javascript"

	src="<?= HOME ?>public/exts/js/jquery-1.7.1.min.js"></script>

	<script type="text/javascript" src="<?php echo BASE_URL; ?>/public/exts/js/jquery.cookie.js"></script>

<script type="text/javascript" language="javascript"

	src="<?= HOME ?>public/exts/js/lazy.js"></script>

<script type="text/javascript" language="javascript"

	src="<?= HOME ?>public/exts/slider2/jquery.nouislider.min.js"></script>

<script type="text/javascript">var baseUrl = '<?= HOME; ?>';</script>

<link

	href='http://fonts.googleapis.com/css?family=Roboto+Condensed&subset=vietnamese'

	rel='stylesheet' type='text/css'>





</head>

<body style="padding-top: 50px">

	<div id="fb-root"></div>

	<script type="text/javascript">

    

    var cache = jQuery.ajaxSettings.cache; 

    jQuery.ajaxSettings.cache = cache;

      window.fbAsyncInit = function() {

    	 

          

        FB.init({

          appId      : '<?php echo FB_ID ?>',

          status     : true,

          xfbml      : true,

          cookie	: true,

        });

        FB.Event.subscribe('edge.create', function(href, widget) {

  		$.cookie('membervisited_btt',1,{expires: 700000,path:'/'});

        });

  		FB.getLoginStatus( function(response) { 

  			 

  		 	if (response.status === 'connected') {

  		 	

  					var user_id = response.authResponse.userID;

  		            var fql_query = "SELECT uid FROM page_fan WHERE page_id = 599565483422485 and uid="+user_id;

  		            FB.Data.query(fql_query).wait(function(rows) {

  	  		       

  		              if (rows.length == 1 && rows[0].uid == user_id) {

  		              	
console.log('da like');
  						$.cookie('popface', 1, {expires: 700000,path:'/'});

  		               	

  		              } else {

  		            	console.log('chua like');

  		            	popface = $.cookie('popface');

  		            	

	  		  			if(popface == null || popface == '' || typeof popface == 'undefined'){

	  		  				modal = '<div class="modal fade" id="popupface">';

	  		  				modal +='	  <div class="modal-dialog">';

	  		  				modal +='  <div class="modal-content">';

	  		  				modal +='    <div class="modal-header">';

	  		  				modal +='      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>';

	  		  				modal +='       <h4 class="modal-title">Like mong.vn trên facebook</h4>';

	  		  				modal +='</div>';

	  		  				modal +='<div class="modal-body">';

	  		  				modal +='<div class="fb-like-box" data-href="https://www.facebook.com/pages/Mộng/599565483422485" data-width="538" data-height="270" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="false"></div>';

	  		  				modal +='</div>';

	  		  				modal +='<div class="modal-footer">';

	  		  				modal +='<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>';

	  		  				modal +='</div>';

	  		  				modal +='</div><!-- /.modal-content -->';

	  		  				modal +='</div><!-- /.modal-dialog -->';

	  		  				modal +='</div><!-- /.modal -->';



	  		  				

	  		  				

	  		  				

	  		  				$('body').append(modal);

	  		  				

	  		  				FB.XFBML.parse(document.getElementById("popupface"));

	  		  				

	  		  			 	$('#popupface').on('hidden.bs.modal', function () {

	  		  				

	  		  				$.cookie('popface', 1, { expires: 5, path: '/' });

	  		  				

	  		  				});

		  		      	}

  		              

  		              

  		            }



  		            });

  				

  		 			

  		  		 }else{

					

  		  		 }

  		 	});

  		

      

      };

      

      (function(d, s, id){

         var js, fjs = d.getElementsByTagName(s)[0];

         if (d.getElementById(id)) {return;}

         js = d.createElement(s); js.id = id;

         js.src = "//connect.facebook.net/en_US/all.js";

         fjs.parentNode.insertBefore(js, fjs);

       }(document, 'script', 'facebook-jssdk'));

    

    </script>



	<div id="wrapAll">



		<?php if($_SESSION['mobile']==0){ ?>

		<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">

			<!-- Brand and toggle get grouped for better mobile display -->

			<div class="navbar-header ">

				<button type="button" class="navbar-toggle navbar-left"

					data-toggle="collapse" data-target=".navbar-ex1-collapse">

					<span class="sr-only">Toggle navigation</span> <span

						class="icon-bar"></span> <span class="icon-bar"></span> <span

						class="icon-bar"></span>

				</button>

				<a class="navbar-brand" href="<?php echo HOME ?>"> <!--	<img src="<?php echo HOME; ?>public/images/logo.png" height="45px" /> -->

					<i class="fa fa-home"></i> Mộng.VN

				</a>





			</div>

			<!-- end .navbar-header -->

			<!-- Collect the nav links, forms, and other content for toggling -->



			<div class="collapse navbar-collapse navbar-ex1-collapse yamm">

				<ul class="nav navbar-nav">

					<li><a href="<?php echo HOME."truyen" ?>"> <i class="fa fa-archive"></i>

							Kho Truyện

					</a></li>

					<li><a href="<?php echo url() ?>#" class="show_story_history"> <i

							class="fa fa-bookmark"></i> Lịch Sử Đọc Truyện <span

							class="badge"><?php echo count($_COOKIE['tc']); ?> </span>

					</a></li>

					<li><a href="<?php echo HOME."video" ?>"><i

							class="fa fa-video-camera"> </i> Video </a></li>

					<li><a href="<?php echo HOME."blog" ?>"><i class="fa fa-book"></i>

							Blog</a></li>

					<li><a href="<?php echo HOME."blog" ?>"><i

							class="fa fa-facebook-square"> </i> Facebook</a></li>

					<li><a href="http://mong.vn/blog/playlist/13.html"><i

							class="fa fa-asterisk"></i> Hướng Dẫn</a></li>



				</ul>

				<ul class="nav navbar-nav navbar-right">

					<?php

					if($_SESSION['user']['level']==1 || $_SESSION['level']==2|| $_SESSION['level']==3){

					static_admin();

					}?>



					<li class="upload_mn"><a href="<?PHP echo  UPLOAD ?>"><i

							class="fa fa-cloud-upload"></i> UPLOAD</a></li>

					<?php if(!isset($_SESSION['user'])){ ?>

					<li class="dropdown"><a href="#" class="dropdown-toggle"

						data-toggle="dropdown"><i class="fa fa-user"></i> User <b

							class="caret"></b> </a>

						<ul class="dropdown-menu">

							<li></li>

							<li><a href="<?php echo LOGIN ?>">Đăng Nhập bằng Facebook</a></li>

						</ul>

					</li>

					<?php }else{ // ISSET SESSION USER ---

					?>

					<li class="dropdown"><a href="#" class="dropdown-toggle"

						data-toggle="dropdown"><i class="fa fa-user"></i> <?php echo show_username($_SESSION['user']['username'],$_SESSION['user']['name']);?>

							<b class="caret"></b> </a>

						<ul class="dropdown-menu">

							<li role="presentation" class="dropdown-header">Tài Khoản</li>

							<li><a href="<?php echo USER_INFO;?>">Thông Tin</a></li>

							<li><a href="<?php echo USER_CHANGEPASSWORD; ?>">Thay đổi mật

									khẩu</a></li>

							<li><a

								href="<?php echo HOME;?>index.php?module=user&act=truyen&type=history">Theo

									Dõi Truyện</a></li>



							<li role="presentation" class="divider"></li>

							<?php if($_SESSION['user']['upload']==1){ ?>

							<li role="presentation" class="dropdown-header">Quản Lý Nội Dung</li>

							<li><a

								href="<?php echo HOME ?>index.php?module=user&act=truyen&type=truyen">Truyện</a>

							</li>

							<li><a

								href="<?php echo HOME ?>index.php?module=user&act=post&type=text">Blog</a>

							</li>

							<li><a

								href="<?php echo HOME ?>index.php?module=user&act=post&type=video">Video</a>

							</li>

							<li role="presentation" class="divider"></li>

							<?php }else{?>

							<li><a

								href="http://mong.vn/blog/Dang-Ky-up-bai-tai-Mongvn/326.html">Đăng

									Ký Upload</a></li>

							<li role="presentation" class="divider"></li>

							<?php } ?>

							<li><a href="<?php echo LOGOUT ?>"><span

									class="glyphicon glyphicon-log-out"></span> Thoát</a></li>



						</ul>

					</li>

					<?php } ?>

				</ul>





			</div>

			<!-- /.navbar-collapse -->

		</nav>





		<div class="row"

			style="margin: auto; margin-bottom: 20px; padding: 10px; max-width: 1100px">

			<div class="col-md-3 col-xs-6">

				<div id="logo">



					<a href="<?php echo HOME; ?>"><img src="public/images/logo2.png"

						class="img-responsive" alt="mong.vn logo" style="max-width: 200px" />

					</a>

				</div>

			</div>

			<div class="col-md-8 col-xs-6">

				<script async

					src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

				<!-- Mong.vn -->

				<ins class="adsbygoogle"

					style="display: inline-block; width: 728px; height: 90px"

					data-ad-client="ca-pub-6643486112344004" data-ad-slot="3158471272"></ins>

				<script>

(adsbygoogle = window.adsbygoogle || []).push({});

</script>



			</div>

		</div>





		<?php

		//$_session mobile ==0

				 }else {?>

		<!-- START MENU -->

		<header class="css3aw-theme-dark">



			<div id="css3aw-main-menu-wrapper">

				<div id="css3aw-menu-trigger-icon">

					<span class="css3aw-menu-dash"></span> <span

						class="css3aw-menu-dash"></span> <span class="css3aw-menu-dash"></span>

				</div>



				<div id="css3aw-main-menu-container">

					<ul id="css3aw-menu">

						<li><a href="<?php echo HOME ?>"><span aria-hidden="true"

								class="icon-home"></span>HOME</a></li>

						<li class="css3aw-has-submenu"><a

							href="<?php echo url(); ?>#"><span   aria-hidden="true"

							class="icon-book"></span>Truyện</a>

							<ul>

								<?php echo get_list_theloai_truyen_mobi(); ?>

							</ul>

						</li>

						<li><a class="show_story_history"><span aria-hidden="true"

								class="icon-stack"></span>Lịch Sử Đọc Truyện <span class="badge"><?php echo count($_COOKIE['tc']); ?>

							</span> </a></li>

						<li class="css3aw-has-submenu"><a

							href="<?php echo url(); ?>#"><span   aria-hidden="true"

							class="icon-film"></span>Video - Music</a>

							<ul>



								<?php echo	get_list_category_video_mobi();?>

							</ul>

						</li>

						<li class="css3aw-has-submenu"><a

							href="<?php echo url(); ?>#"><span   aria-hidden="true"

							class="icon-file"></span>Blog</a>

							<ul>

								<?php echo get_list_category_blog_mobi();?>

							</ul>

						</li>



					</ul>

				</div>



			</div>



			<h3

				style="font-family: Arial, Helvetica, sans-serif; font-size: 14px">

				<?php if(isset($_GET['module']) && $_GET['module']=='truyen'){?>

				<a href="<?php echo HOME.'truyen' ?>">Kho Truyện</a>&nbsp;&nbsp; |

				&nbsp;&nbsp; <a href="<?php echo url() ?>#category">Thể Loại</a>

				<?php }else

		 if(isset($_GET['module']) && $_GET['module']=='news' && $_GET['type']=='blog'){?>

				<a href="<?php echo HOME.'blog' ?>"> BLOG</a>

				<?php }else

		 if(isset($_GET['module']) && $_GET['module']=='news' && $_GET['type']=='video'){?>

				<a href="<?php echo HOME.'video' ?>"> Video - Music</a>

				<?php }else

		 		     {    ?>

				<a href="<?php echo HOME ?>"><i class="fa fa-home"></i> MONG.VN</a>

				<?php }?>

			</h3>

			<?php /*

		 		     <div id="css3aw-social-menu-wrapper">

		 		     <span aria-hidden="true" class="icon-share"></span>

		 		     <ul id="css3aw-social-menu">

		 		     <li><a href="#"><span aria-hidden="true" class="icon-book"></span> </a></li>

		 		     <li><a href="#"><span aria-hidden="true" class="icon-film"></span> </a></li>

		 		     <li><a href="#"><span aria-hidden="true" class="icon-file"></span> </a></li>

		 		     <li><a href="#"><span aria-hidden="true" class="icon-facebook"></span></a></li>

		 		     <li><a href="#"><span aria-hidden="true" class="icon-google-plus"></span></a></li>

		 		     <li><a href="#"><span aria-hidden="true" class="icon-youtube"></span></a></li>



		 		     </ul>

		 		     </div>

		*/ ?>





		</header>

		<!-- End of Menu -->



		<div style="height: 5px"></div>



		<?php 

		if(isset($_GET['module']) && $_GET['module']=='truyen'){

			   ?>





		<div style="height: 5px"></div>



		<input type="hidden" name="optionvalue" id="menu-search-box"

			class="input-medium" data-placeholder="Nhập Tên Truyện ..." />

		<div style="height: 5px"></div>

		<?php }?>



		<?php }  ?>

		<div style="height: 5px"></div>